package com.gxkj.projects.myshopx.controllers.sitemesh;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("/sitemesh")
public class SitemeshController {
//    @RequestMapping(value="decorator",method= RequestMethod.GET)
//    public String decorator(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap){
//        return "sitemesh/decorators/decorator";
//    }
//    @RequestMapping(value="decorators/{decoratorName}",method= RequestMethod.GET)
//    public String decoratorName(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap,
//                                @PathVariable(value="decoratorName") String decoratorName){
//        return "sitemesh/decorators/"+decoratorName;
//    }
    @RequestMapping(value="login",method= RequestMethod.GET)
    public String login(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap){
        return "sitemesh/sitemesh-login";
    }
    @RequestMapping(value="reg",method= RequestMethod.GET)
    public String reg(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap){
        return "sitemesh/sitemesh-reg";
    }

    @RequestMapping(value="",method= RequestMethod.GET)
    public String index(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap){
        return "sitemesh/sitemesh-index";
    }
    @RequestMapping(value="**",method= RequestMethod.GET)
    public String All(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap){
        return "sitemesh/sitemesh-templetate";
    }
}
